<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_validate.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
<head>
    @include('layouts.admin.header')
    <link rel="stylesheet" type="text/css" href="/css/plugins/webuploader/webuploader.css">
</head>

<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="wxSetForm" method="post" action="">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">上传照片：</label>
                            <div class="col-sm-3">
                                <div id="filePicker"></div>
                                <div id="preview">

                                </div>
                                <input name="headimg" class="form-control" type="hidden">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button class="btn btn-primary submit_form" type="submit">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/plugins/webuploader/webuploader.min.js"></script>
    <script>
        function uploadSuccess(file,response){
            var msg = eval(response);
            console.log(response);
            if(parseInt(msg.code) == 0){
                console.log(msg);
                $("#preview").html('<img src="'+msg.data.img_thumb+'" style="height: 100px;" class="upload_qrcode"/>');
                $("[name=headimg]").val(msg.data.img);
            }else{
                alertError(msg.msg);
            }
        }
        bind_uploder("#filePicker","上传照片","{{url('admin/imageUploadOne')}}",'test',uploadSuccess);
    </script>
</div>
</body>
</html>
